<?php
namespace app\api\validate\service;

use think\Validate;

class ApplySkill extends Validate
{

    protected $rule =   [
        'name'               => 'require',
        'goods_ids'          => 'require',
        'skill_cate_id'      => 'require',
        'idcard'             => 'require',
        'image'              => 'require',
        'health_image'       => 'require',
        'front_image'        => 'require',
        'opposite_image'     => 'require',
        'certificate_image'  => 'require',
        'address'            => 'require',
        'lng'                => 'require',
    ];

    protected $message  =   [
        'name.require'             => '请填写姓名',
        'skill_cate_id.require'    => '服务技能必须选择',
        'idcard.require'           => '身份证号必须填写',
        'image.require'            => '工装照必须上传',
        'goods_ids.require'        => '服务项目必须选择',
        'front_image.require'      => '身份证必须上传',
        'opposite_image.require'   => '身份证必须上传',
        'certificate_image.require'=> '从业资格证必须上传',
        'address.require'          => '请填写地址信息',
        'lng.require'              => '定位信息异常'
    ];

    protected $scene = [
//        'edit'  =>  ['name','skill_cate_id','idcard','image','front_image','opposite_image','certificate_image','goods_ids','address','lng'],
//        'add'   =>  ['name','skill_cate_id','idcard','image','front_image','opposite_image','certificate_image','goods_ids','address','lng'],
        'edit'  =>  ['name','skill_cate_id','idcard','image','certificate_image','goods_ids','address','lng'],
        'add'   =>  ['name','skill_cate_id','idcard','image','certificate_image','goods_ids','address','lng'],
    ];

}